package com.example.springboot;

import com.example.springboot.service.TestService1;
import com.example.springboot.service.TestService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Async
public class HelloWorldMain{

    @Autowired
    private TestService1 testService1;
    @Autowired
    private TestService2 testService2;

    @RequestMapping("/hello")
    public String hello() {
        testService1.test1();
        testService2.test2();
        return "hello world";
    }
}
